package com.dt.app.api.shopping.service.impl;

import com.dt.app.modules.shopping.entities.DsContent;
import com.dt.app.modules.shopping.vo.DsContentBean;
import com.dt.app.api.shopping.mapper.DsContentMapper;
import com.dt.app.api.shopping.service.IDsContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 内容 服务实现类
 * </p>
 *
 * @author 鸿源塔基
 * @since 2023-03-13
 */
@Service
public class DsContentServiceImpl extends ServiceImpl<DsContentMapper, DsContent> implements IDsContentService {
    public DsContent getEntity(DsContentBean bean){
        DsContent entity = new DsContent();
        entity.setContentId(bean.getContentId());
        entity.setSysCompanyId(bean.getSysCompanyId());
        entity.setSysDepId(bean.getSysDepId());
        entity.setContentTypeId(bean.getContentTypeId());
        entity.setCountryId(bean.getCountryId());
        entity.setTypePath(bean.getTypePath());
        entity.setContentCode(bean.getContentCode());
        entity.setContentTitle(bean.getContentTitle());
        entity.setSubtitle(bean.getSubtitle());
        entity.setDisplay(bean.getDisplay());
        entity.setContentValue(bean.getContentValue());
        entity.setIssueTime(bean.getIssueTime());
        entity.setExpireTime(bean.getExpireTime());
        entity.setCreateTime(bean.getCreateTime());
        entity.setKeyWords(bean.getKeyWords());
        entity.setDescriptioncon(bean.getDescriptioncon());
        entity.setImgUrl(bean.getImgUrl());
        entity.setWithMedia(bean.getWithMedia());
        entity.setIsTop(bean.getIsTop());
        entity.setUrl(bean.getUrl());
        entity.setCategoryPath(bean.getCategoryPath());
        entity.setRegionPath(bean.getRegionPath());
        entity.setType(bean.getType());
        entity.setSellersId(bean.getSellersId());
        entity.setHyUserId(bean.getHyUserId());
        entity.setLongitude(bean.getLongitude());
        entity.setLatitude(bean.getLatitude());
        entity.setSeq(bean.getSeq());
        entity.setCollectionCount(bean.getCollectionCount());
        entity.setTagCount(bean.getTagCount());
        entity.setCommentCount(bean.getCommentCount());
        entity.setLookCount(bean.getLookCount());
        entity.setMembershipsLevel(bean.getMembershipsLevel());
        return entity;
    }
    public DsContentBean getBean(DsContent entity){
        DsContentBean bean = new DsContentBean();
        bean.setContentId(entity.getContentId());
        bean.setSysCompanyId(entity.getSysCompanyId());
        bean.setSysDepId(entity.getSysDepId());
        bean.setContentTypeId(entity.getContentTypeId());
        bean.setCountryId(entity.getCountryId());
        bean.setTypePath(entity.getTypePath());
        bean.setContentCode(entity.getContentCode());
        bean.setContentTitle(entity.getContentTitle());
        bean.setSubtitle(entity.getSubtitle());
        bean.setDisplay(entity.getDisplay());
        bean.setContentValue(entity.getContentValue());
        bean.setIssueTime(entity.getIssueTime());
        bean.setExpireTime(entity.getExpireTime());
        bean.setCreateTime(entity.getCreateTime());
        bean.setKeyWords(entity.getKeyWords());
        bean.setDescriptioncon(entity.getDescriptioncon());
        bean.setImgUrl(entity.getImgUrl());
        bean.setWithMedia(entity.getWithMedia());
        bean.setIsTop(entity.getIsTop());
        bean.setUrl(entity.getUrl());
        bean.setCategoryPath(entity.getCategoryPath());
        bean.setRegionPath(entity.getRegionPath());
        bean.setType(entity.getType());
        bean.setSellersId(entity.getSellersId());
        bean.setHyUserId(entity.getHyUserId());
        bean.setLongitude(entity.getLongitude());
        bean.setLatitude(entity.getLatitude());
        bean.setSeq(entity.getSeq());
        bean.setCollectionCount(entity.getCollectionCount());
        bean.setTagCount(entity.getTagCount());
        bean.setCommentCount(entity.getCommentCount());
        bean.setLookCount(entity.getLookCount());
        bean.setMembershipsLevel(entity.getMembershipsLevel());
        return bean;
    }
}
